<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <div  th:fragment="dynamicTemplate">
        <div id="mainBox" style="border: 1px solid #000000;margin-right: 15%;position:absolute;left: 15%;right: 2%;">
            <div id="formBox" style="padding-top: 1%;padding-right: 1%">
                <form class="form-horizontal">
                    <input type="hidden" id="editTemplateId" th:value="${editTemplateVO!=null?editTemplateVO.id:''}"/>
                    <div class="form-group">
                        <label for="dynamic-name" class="col-sm-2 control-label">模板名称</label>
                        <div class="col-sm-10">
                            <input th:value="${editTemplateVO!=null?editTemplateVO.name:''}" type="text" class="form-control" id="dynamic-name" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="dynamic-course" class="col-sm-2 control-label">关联课程</label>
                        <div class="col-sm-10">
                            <input th:value="${editTemplateVO!=null?editTemplateVO.yuliu1:''}" list="courseList" type="text" class="form-control" id="dynamic-course" >
                            <dataList id="courseList">
                                <option th:each="course:${allCourse}" th:value="${course}" th:text="${course}"></option>
                            </dataList>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="dynamic_template_total_score" class="col-sm-2 control-label">总分</label>
                        <div class="col-sm-10">
                            <input th:value="${editTemplateVO!=null?editTemplateVO.total_score:0}" id="dynamic_template_total_score" disabled type="number" value="0" class="form-control"  >
                        </div>
                    </div>
                </form>
            </div>
            <ul id="dynamic-template-ul" style="padding-left: 1%;margin-top: 5%">
                <li style="list-style-type: none">
                    <div style="width: 50%;float: left">
                        <form class="form-horizontal">
                            <div>
                                <label style="padding-left: 25%">单选题</label>
                                <span id="dynamic-question1-total_count" class="badge">0题</span>
                                <span id="dynamic-question1-total_score" class="badge">0分</span>
                            </div>

                            <hr/>
                            <div class="form-group">
                                <label for="dynamic-question1-score" class="col-sm-3 control-label">分数</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question1_score:0}" class="form-control" id="dynamic-question1-score" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="dynamic-question1-simple-count" class="col-sm-3 control-label">简单题数量</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question1_count[0]:0}"  class="form-control" id="dynamic-question1-simple-count" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="dynamic-question1-medium-count" class="col-sm-3 control-label">中等题数量</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question1_count[1]:0}"  class="form-control" id="dynamic-question1-medium-count" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="dynamic-question1-difficult-count" class="col-sm-3 control-label">困难题数量</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question1_count[2]:0}" class="form-control" id="dynamic-question1-difficult-count" >
                                </div>
                            </div>
                        </form>
                    </div>
                </li>
                <li style="list-style-type: none">
                    <div style="width: 50%;float: left">
                        <form class="form-horizontal">
                            <div>
                                <label style="padding-left: 25%">多选题</label>
                                <span id="dynamic-question2-total_count" class="badge">0题</span>
                                <span id="dynamic-question2-total_score" class="badge">0分</span>
                            </div>

                            <hr/>
                            <div class="form-group">
                                <label for="dynamic-question2-score" class="col-sm-3 control-label">分数</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question2_score:0}"  class="form-control" id="dynamic-question2-score" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="dynamic-question2-simple-count" class="col-sm-3 control-label">简单题数量</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question2_count[0]:0}" class="form-control" id="dynamic-question2-simple-count" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="dynamic-question2-medium-count" class="col-sm-3 control-label">中等题数量</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question2_count[1]:0}" class="form-control" id="dynamic-question2-medium-count" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="dynamic-question2-difficult-count" class="col-sm-3 control-label">困难题数量</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question2_count[2]:0}" class="form-control" id="dynamic-question2-difficult-count" >
                                </div>
                            </div>
                        </form>
                    </div>
                </li>
                <li style="list-style-type: none">
                    <div style="width: 50%;float: left">
                        <form class="form-horizontal">
                            <div>
                                <label style="padding-left: 25%">判断选题</label>
                                <span id="dynamic-question3-total_count" class="badge">0题</span>
                                <span id="dynamic-question3-total_score" class="badge">0分</span>
                            </div>

                            <hr/>
                            <div class="form-group">
                                <label for="dynamic-question3-score" class="col-sm-3 control-label">分数</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question3_score:0}"  class="form-control" id="dynamic-question3-score" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="dynamic-question3-simple-count" class="col-sm-3 control-label">简单题数量</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question3_count[0]:0}" class="form-control" id="dynamic-question3-simple-count" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="dynamic-question3-medium-count" class="col-sm-3 control-label">中等题数量</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question3_count[1]:0}" class="form-control" id="dynamic-question3-medium-count" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="dynamic-question3-difficult-count" class="col-sm-3 control-label">困难题数量</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question3_count[2]:0}" class="form-control" id="dynamic-question3-difficult-count" >
                                </div>
                            </div>
                        </form>
                    </div>
                </li>
                <li style="list-style-type: none">
                    <div style="width: 50%;float: left">
                        <form class="form-horizontal">
                            <div>
                                <label style="padding-left: 25%">填空题</label>
                                <span id="dynamic-question4-total_count" class="badge">0题</span>
                                <span id="dynamic-question4-total_score" class="badge">0分</span>
                            </div>

                            <hr/>
                            <div class="form-group">
                                <label for="dynamic-question4-score" class="col-sm-3 control-label">分数</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question4_score:0}"  class="form-control" id="dynamic-question4-score" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="dynamic-question4-simple-count" class="col-sm-3 control-label">简单题数量</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question4_count[0]:0}" class="form-control" id="dynamic-question4-simple-count" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="dynamic-question4-medium-count" class="col-sm-3 control-label">中等题数量</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question4_count[1]:0}" class="form-control" id="dynamic-question4-medium-count" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="dynamic-question4-difficult-count" class="col-sm-3 control-label">困难题数量</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question4_count[2]:0}" class="form-control" id="dynamic-question4-difficult-count" >
                                </div>
                            </div>
                        </form>
                    </div>
                </li>
                <li style="list-style-type: none">
                    <div style="width: 50%;float: left">
                        <form class="form-horizontal">
                            <div>
                                <label style="padding-left: 25%">综合题</label>
                                <span id="dynamic-question5-total_count" class="badge">0题</span>
                                <span id="dynamic-question5-total_score" class="badge">0分</span>
                            </div>

                            <hr/>
                            <div class="form-group">
                                <label for="dynamic-question5-score" class="col-sm-3 control-label">分数</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question5_score:0}" class="form-control" id="dynamic-question5-score" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="dynamic-question5-simple-count" class="col-sm-3 control-label">简单题数量</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question5_count[0]:0}" class="form-control" id="dynamic-question5-simple-count" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="dynamic-question5-medium-count" class="col-sm-3 control-label">中等题数量</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question5_count[1]:0}" class="form-control" id="dynamic-question5-medium-count" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="dynamic-question5-difficult-count" class="col-sm-3 control-label">困难题数量</label>
                                <div class="col-sm-9">
                                    <input style="width: 25%" th:value="${editTemplateVO!=null?editTemplateVO.question5_count[2]:0}" class="form-control" id="dynamic-question5-difficult-count" >
                                </div>
                            </div>
                        </form>
                    </div>
                </li>
            </ul>
            <button onclick="template.dynamic.templateSave()" class="btn-primary" type="button" style="text-align: center">保存</button>
        </div>
    </div>
</html>